# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=py3-argon2-cffi
pkgver=21.1.0
pkgrel=1
pkgdesc="The secure Argon2 password hashing algorithm"
url="https://argon2-cffi.readthedocs.io/en/stable/"
arch="all !s390x" # Fails to build
license="MIT"
depends="python3 py3-cffi"
makedepends="argon2-dev python3-dev py3-setuptools libffi-dev py3-wheel"
checkdepends="py3-pytest py3-hypothesis"
source="https://pypi.io/packages/source/a/argon2-cffi/argon2-cffi-$pkgver.tar.gz"
builddir="$srcdir/argon2-cffi-$pkgver"

export ARGON2_CFFI_USE_SYSTEM=1

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo "$PWD"/build/lib.*)" py.test-3 -v
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
bbfebd2c075f360a6c1c187c0789be2aae7480b9398f36db7bdfe74f288d9e00b44a788918c54f4cc8bb1947136ab0493f61975de408c482a5131e2bf1a8f4d0  argon2-cffi-21.1.0.tar.gz
"
